package com.sc.nft.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class UserPointsDetailsStatisticsVO {

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "用户手机号")
    private String userTel;

    @ApiModelProperty(value = "用户昵称")
    private String nickName;

    @ApiModelProperty(value = "累计总燃料")
    private String totalSumPoints;

    @ApiModelProperty(value = "累计使用总燃料")
    private String totalUseSumPoints;

    @ApiModelProperty(value = "累计失效总燃料")
    private String totalExpiredSumPoints;


    @ApiModelProperty(value = "可用燃料")
    private String amount;

    @ApiModelProperty(value = "冻结燃料")
    private String frozenPoints;

    @ApiModelProperty(value = "可释放额度")
    private String usableAmountUpperLimit;

    @ApiModelProperty(value = "释放额度")
    private String releaseAmount;


    public void setTotalSumPoints(BigDecimal totalSumPoints) {
        this.totalSumPoints = totalSumPoints.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setTotalUseSumPoints(BigDecimal totalUseSumPoints) {
        this.totalUseSumPoints = totalUseSumPoints.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setTotalExpiredSumPoints(BigDecimal totalExpiredSumPoints) {
        this.totalExpiredSumPoints = totalExpiredSumPoints.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }


    public void setAmount(BigDecimal amount) {
        this.amount = amount.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setFrozenPoints(BigDecimal frozenPoints) {
        this.frozenPoints = frozenPoints.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setUsableAmountUpperLimit(BigDecimal usableAmountUpperLimit) {
        this.usableAmountUpperLimit = usableAmountUpperLimit.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setReleaseAmount(BigDecimal releaseAmount) {
        this.releaseAmount = releaseAmount.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }
}
